home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / text / mac / faqs.138 < prev    next >
Encoding:
Text File  |  1996-02-12  |  27.8 KB  |  676 lines

  1. Frequently Asked Questions (FAQS);faqs.138
  2.  
  3.  
  4.  
  5. If you just type 'lsattr -E -l sys0' you will get a list of all parameters,
  6. some of which can be changed - others not.
  7.  
  8. If you want to use smit, this procedure can be followed:
  9.  
  10. smit
  11.   System Environments and Processes
  12.     Change / Show Operating System Parameters
  13.       - on this screen you can change by overtyping the following fields:
  14.         - Maximum number of PROCESSES allowed per user
  15.         - Maximum number of pages in block I/O BUFFER CACHE
  16.         - Maximum Kbytes of real memory allowed for MBUFS
  17.       - toggle fields exist for:
  18.         - Automatically REBOOT system after a crash  (false/true)
  19.         - Continuously maintain DISK I/O history (true/false)
  20.  
  21.  
  22. 1.16: My /dev/null seems to have disappeared or become a plain file, why?
  23.  
  24. The script /usr/etc/lsnfsexp has a bug in 3.1.3. Change line 100 from
  25.   rm -rf ${TMP_FILE} >/dev/null 2>&1 /dev/null
  26. to
  27.   rm -rf ${TMP_FILE} >/dev/null 2>&1
  28.  
  29. and recreate /dev/null by:
  30.  
  31.   # mknod /dev/null c 2 2
  32.   # chmod 666 /dev/null
  33.  
  34. This is fixed in release 3.1.5.
  35.  
  36.  
  37. 1.17: The swapper seems to use extreme amount of paging space, why?
  38.  
  39. When you run ps, you may see a line like:
  40.  
  41. USER   PID %CPU %MEM    SZ   RSS     TT STAT  TIME CMD
  42. root     0 0.0%  14% 386528  8688      -    S 17:06 swapper
  43.  
  44. This is normal behavior, the swapper looks to ps like it has the entire
  45. paging space plus real memory allocated.
  46.  
  47.  
  48. 1.18: How much should I trust the ps memory reports?
  49. From: chukran@austin.VNET.IBM.COM
  50.  
  51. Using "ps vg" gives a per process tally of memory usage for each running
  52. process.  Several fields give memory usage in different units, but these
  53. numbers do not tell the whole story on where all the memory goes.
  54.  
  55. First of all, the man page for ps does not give an accurate description
  56. of the memory related fields.  Here is a better description:
  57.  
  58. RSS - This tells how much RAM resident memory is currently being used
  59. for the text and data segments for a particular process in units of
  60. kilobytes.  (this value will always be a multiple of 4 since memory is
  61. allocated in 4 KB pages).
  62.  
  63. %MEM - This is the fraction of RSS divided by the total size of RAM for
  64. a particular process.  Since RSS is some subset of the total resident
  65. memory usage for a process, the %MEM value will also be lower than actual.
  66.  
  67. TRS - This tells how much RAM resident memory is currently being used
  68. for the text segment for a particular process in units of kilobytes.
  69. This will always be less than or equal to RSS.
  70.  
  71. SIZE - This tells how much paging space is allocated for this process
  72. for the text and data segments in units of kilobytes.  If the executable
  73. file is on a local filesystem, the page space usage for text is zero.
  74. If the executable is on an NFS filesystem, the page space usage will be
  75. nonzero.  This number may be greater than RSS, or it may not, depending
  76. on how much of the process is paged in.  The reason RSS can be larger is
  77. that RSS counts text whereas SIZE does not.
  78.  
  79. TSIZ - This field is absolutely bogus because it is not a multiple of 4
  80. and does not correlate to any of the other fields.
  81.  
  82. These fields only report on a process text and data segments.  Segment
  83. size which cannot be interrogated at this time are:
  84.  
  85.        Text portion of shared libraries (segment 13)
  86.  
  87.        Files that are in use. Open files are cached in memory as
  88.        individual segments.  The traditional kernel cache buffer
  89.        scheme is not used in AIX 3.
  90.  
  91.        Shared data segments created with shmat.
  92.  
  93.        Kernel segments such as kernel segment 0, kernel extension
  94.        segments, and virtual memory management segments.
  95.  
  96. Speaking of kernel segments, the %MEM and RSS report for process zero
  97. are totally bogus for AIX 3.1.  The reason why RSS is so big is that the
  98. kernel segment zero is counted twice.  For AIX 3.2, this has been
  99. changed, but the whole story is still not known.  The RSS value for
  100. process 0 will report a very small number of the swapper private data
  101. segment.  It does not report the size of the kernel segment 0, where the
  102. swapper code lives.
  103.  
  104. In summary, ps is not a very good tool to measure system memory usage.
  105. It can give you some idea where some of the memory goes, but it leaves
  106. too many questions unanswered about the total usage.
  107.  
  108.  
  109. 1.19 *How do I mount a floppy disk as a filesystem?
  110.  
  111. From: op@holmes.acc.Virginia.EDU (Olaf Pors)
  112.  
  113. You can build a filesystem on a floppy and mount it, however the
  114. filesystem will be read only.  The reason that the filesystem will be
  115. read only is because AIX Version 3.1.5 cannot create a journal log on a
  116. diskette.  The intended use is for temporary access to the read only
  117. data.  The diskette file system must be unmounted after use and during
  118. system backup procedures or errors could occur.
  119.  
  120. To make the read only filesystem on a floppy:
  121.  
  122. 1. Make a subdirectory on an existing filesystem on the hardfile, and
  123.    place all of the files that the diskette will contain into this
  124.    subdirectory.
  125.  
  126. 2. Enter the following command to create a prototype file containing
  127.    information about the new filesystem, in the example /dir_struct
  128.    is the pathname of the subdirectory created in step 1, and
  129.    proto_filename is the name of the prototype file to be created.
  130.  
  131.          proto /dir_struct > proto_filename
  132.  
  133. 3. Place your floppy disk into the drive and format it.
  134.  
  135. 4. Edit the prototype file and replace the first line with the following:
  136.  
  137.          <noboot> 0 0
  138.  
  139. 5. Enter the following command to make the filesystem on your floppy:
  140.  
  141.           mkfs -p proto_filename -V jfs /dev/fd0
  142.  
  143. 6. Create the directory upon which you will mount the floppy based
  144.    filesystem, or you can use the /mnt directory.  Enter the following
  145.    command to mount the filesystem:
  146.  
  147.           mount -r -V jfs /dev/fd0 /your_mount_point
  148.  
  149. 7. To unmount the filesystem, use the command:
  150.  
  151.           umount /dev/fd0
  152.  
  153. Since the filesystem is read-only it may be of limited use but if you
  154. are going to use it for utility programs and other data that does not
  155. change much, it still may be useful.  If you need to change the data,
  156. you can copy the directory from the floppy into another directory, make
  157. your modifications, and remake the filesystem using this procedure.
  158.  
  159.  
  160. 1.20  Some info about tape backups
  161. From: Craig Anderson
  162.  
  163. The following supplements the information on rmt devices in
  164. InfoExplorer.  It is based on my own personal experience with IBM tape
  165. drives running on AIX 3.1.  No warranty is expressed or implied.
  166.  
  167. CONFIGURING THROUGH SMIT:
  168.     BLOCK size (0=variable length)        (ALL)
  169.     Sets the tape block size.  When reading, the block size must be
  170.     set to the block size set when the tape was written.  When
  171.     using some commands, tapes written with ANY block size can be
  172.     read if the block size is set to 0 (variable length) (see
  173.     "BLOCK SIZES" below).
  174.  
  175.     Use DEVICE BUFFERS during writes        (ALL)
  176.     Set to yes, the device will buffer data internally on writes.
  177.     This greatly improves performance, but under certain cases may
  178.     be undesirable since the data is not written to tape before
  179.     returning a good indication.
  180.  
  181.     Use EXTENDED file marks            (8mm only)
  182.     Extended file marks take up much more space than short (or
  183.     non-extended) file marks.  But extended file marks can be
  184.     overwritten, allowing data not at the beginning of tape to be
  185.     overwritten (see "FILE MARKS" below).
  186.  
  187.     RETENSION on tape change or reset        (1/4" only)
  188.     If set to "no" then the tape will not be retentioned
  189.     automatically when the tape is inserted.  Note that this will
  190.     take effect only after the device is used.
  191.  
  192.  
  193. FILE MARKS:
  194.      Tape devices support multiple tape files.  Tape files are the
  195.      result of a backup/cpio/tar/dd type command, where the device is
  196.      opened, written to, and closed.  Because tapes allow large
  197.      quantities of data to be written on a single tape, several backups
  198.      (that is, tape files), may be combined on one physical tape.
  199.      Between each tape file is a "tape file mark" or simply "file
  200.      mark".  These file marks are used by the device driver to indicate
  201.      where one tape file ends and another begins.
  202.  
  203.                               B       E
  204.                    <-------   O       O   ------->
  205.                               T       T
  206.               __ ____________________________ _______________
  207.      physical | \            |       |      \             |physical
  208.      beginning|  \           | tape  |       \            | end
  209.        of     |   \          | file  |        \           |  of
  210.       tape    |    \         | mark  |         \          | tape
  211.               |_____\________|_______|__________\_________|
  212.  
  213.      Note that there is a distinction between the beginning of tape
  214.      (BOT) side of a file mark and the end of tape (EOT) side of a file
  215.      mark.  If the head is on the BOT side of a file- mark, "tctl fsf
  216.      1" command will move only to the EOT side of the same file mark.
  217.  
  218.      With the 1/4" tape drive, writing can only take place
  219.      sequentially, or after blank tape has been detected.  You cannot
  220.      write over data on the tape (except at BOT).  If you wish to add
  221.      data to a tape which has been written and then rewound you should
  222.      space forward file mark until an error occurs.  Only then can
  223.      you start writing again.
  224.  
  225.      With an 8mm tape drive, writing can only take place before blank
  226.      tape, an EXTENDED file mark, or at BOT.  Thus if several backups
  227.      have been made on one tape and you wish to overwrite one of the
  228.      backups, position the tape to the place you wish to start writing
  229.      and issue the following commands:
  230.     tctl bsf 1
  231.     tctl eof 1
  232.      The first command skips back to the BOT side of the same file
  233.      mark.  The second command rewrites the file mark (writing is
  234.      allowed before extended file marks).  The erase head will erase
  235.      data ahead of the write head, so that after writing the file mark
  236.      the head will be positioned before blank tape.  Only after this
  237.      may you start writing over data in the middle of the tape.  (All
  238.      data beyond where you are currently writing will be lost).  Note
  239.      that you cannot write over short file marks.  In order for this to
  240.      work, the tape must have been written with extended file marks
  241.      (use smit to change this).
  242.  
  243.      With the 9-track drive writing can take place anywhere on the
  244.      tape although overwriting single blocks of data is not supported.
  245.  
  246.      On the 8mm drive extended filemarks use 2.2 megabytes of tape and
  247.      can take up to 8.5 seconds to write.  Short filemarks use 184K
  248.      and take up to 1.5 seconds to write.
  249.  
  250. BLOCK SIZES:
  251.      When data is written to tape it is written in blocks.  The blocks
  252.      on a tape are separated by inter-record gaps.  It is important to
  253.      understand the structure of the written tape in order to
  254.      understand the problems which can occur with changing block
  255.      sizes.
  256.  
  257.      In fixed block size mode all blocks on the tape are the same
  258.      size.  They are the size of the block size set in the device
  259.      configuration.  All read()s and write()s to the tape drive must be
  260.      a multiple of the fixed block size.
  261.  
  262.      In fixed block mode a read() will return as many blocks as needed
  263.      to satisfy the read() request.  If a file mark is encountered
  264.      while reading the tape only the data up until the file mark will
  265.      be returned.
  266.  
  267.      It is not possible for the tape drive to read a tape whose block
  268.      size is not the same as the block size in the device
  269.      configuration.  (Unless the device configuration is in variable
  270.      size blocks.)
  271.  
  272.      In variable block size (0) mode, the blocks written on the tape
  273.      are the size of the read() and write() requests to the device
  274.      driver.  In this case, the actual block sizes on the tape can be
  275.      changed using the options to the backup commands (tar -C, cpio -C,
  276.      backup -C).
  277.  
  278.      In variable mode, read() requests greater than size of the block
  279.      on the tape will return only the data from the next block on the
  280.      tape.  It is this feature that allows tapes written in any block
  281.      size (fixed or variable) to read with the dd command (the output
  282.      from the dd command may be piped to restore, tar, or cpio for
  283.      example.)  Note that backup, tar, and cpio cannot read all tapes
  284.      by using a large block size because they assume there is an error
  285.      if they get a short read().
  286.         dd ibs=128k obs=16k if=/dev/rmt0 | ...
  287.  
  288.      The tape head is always positioned at an inter-record gap, file
  289.      mark, or blank tape after reading or writing.
  290.  
  291.      With the 8mm tape drive, using a fixed block size which is not a
  292.      multiple of 1K is inefficient.  The 8mm tape drive always writes
  293.      internally in 1K blocks.  It simulates the effect of variable
  294.      block sizes, but, for example, using a fixed block size of 512
  295.      bytes (or using variable block size and write()ing 512 bytes at a
  296.      time) wastes one half of the tape capacity and gives only one half
  297.      the maximum transfer rate.
  298.  
  299.  
  300. EXCHANGING DATA WITH NON-UNIX AND OTHER VENDORS MACHINES:
  301.      Many tape drives support both variable and fixed block sizes.
  302.  
  303.      Variable block mode writes block sizes the size of the write
  304.      command issued (tar and backup specify this with the -b option).
  305.      In fixed mode, block sizes are fixed and all writes must be a
  306.      multiple of the fixed block size.
  307.  
  308.      Unix often internally chops larger reads and writes up into
  309.      manageable pieces (often 65535, 65534, or 65532 bytes) before
  310.      doing the actual reads and writes.  This means reads and writes of
  311.      64K bytes are often broken up into a 65535 byte record and a 1
  312.      byte record (In fixed mode the write will fail).  Block sizes >=
  313.      64K (-C128 and greater) should be avoided for this reason.  AIX
  314.      does not break up read and write requests, but be aware of the
  315.      situation on other machines.
  316.  
  317.      If the tape is written in an unknown block size then set the
  318.      device configuration in smit to use variable size blocks, use the
  319.      "dd" command with a large input block size, and pipe it to the
  320.      restore command.  For example:
  321.       chdev -l rmt0 -a block_size=0
  322.       dd if=/dev/rmt0 ibs=128k obs=16k | tar -tvf-
  323.  
  324.  
  325. 1.21: *How do I do remote backup?
  326. From: oquinn@elder.austin.ibm.com
  327.  
  328. You can back up files on a remote tape drive with:
  329.  
  330.   tar -cBf - . | rsh REMOTEHOST "tar -xBf /dev/TAPEDEVICE"
  331.  
  332.  
  333. From: kraemerf@franvm3.VNET.IBM.COM (Frank Kraemer)
  334.  
  335. mksysb will not back up to remote tape devices. Frank provided the
  336. following script to do remote backups.
  337.  
  338. #!/bin/ksh
  339. # @(#) Create a backup tape of the private user data.
  340. #=================================================================#
  341. #   Script :  usave.sh                                            #
  342. #   Author :  F. Kraemer                                          #
  343. #   Date   :  92/02/19                                            #
  344. #   Update :  92/10/29                                            #
  345. #   Info   :  the ultimative backup script                        #
  346. #   Example:  usave.sh /dev/rmt0      -  save to local tape       #
  347. #             usave.sh /save/save.me  -  save to local file       #
  348. #             usave.sh /tmp/pipe      -  save to remote tape      #
  349. #-----------------------------------------------------------------#
  350. PS4="(+) "
  351. #set -x
  352. PROG=$(basename $0)
  353. HOST=$(hostname)
  354. TODAY=$(date +%H:%M:%S)
  355. #-----------------------------------------------------------------#
  356. # cleanup                                                         #
  357. #-----------------------------------------------------------------#
  358. cleanup ()
  359. {
  360. ec=$1
  361. error=$2
  362. case "$ec"
  363. in
  364.    "$USAGE_EC")    # usage error
  365.      error="Usage:\t$PROG DeviceName\n" 1>&2
  366.     ;;
  367.    "$NOTAP_EC")    # Tape error
  368.      error="error:\t$PROG: $DEVICE is not available on the system.\n" 1>&2
  369.     ;;
  370.    "$LISTE_EC")    # list error
  371.      error="error:\t$PROG: could not create tar list for $LOGNAME.\n" 1>&2
  372.     ;;
  373.    "$NOTAR_EC")    # tar command error
  374.      error="error:\t$PROG: tar command failed.\n" 1>&2
  375.     ;;
  376.    "$PIPEP_EC")    # pipe error
  377.      error="error:\t$PROG: mknod command failed.\n" 1>&2
  378.     ;;
  379.    "$NORSH_EC")    # rsh error
  380.      error="error:\t$PROG: rsh - Remote Shell command failed.\n" 1>&2
  381.     ;;
  382.    "$RHOST_EC")    # remote host error
  383.      error="error:\t$PROG: Remote Host unknown.\n" 1>&2
  384.     ;;
  385.    *)
  386.    ;;
  387. esac
  388. case "$DEVICE"
  389. in
  390.     #
  391.     # Fix the block size if $DEVICE is a tape device
  392.     #
  393.     /dev/rmt[0-9]*)
  394.         echo "\n\t$PROG: Rewinding tape to begin.........(please wait)\n"
  395.         tctl -f $DEVICE rewind 2>/dev/null
  396.         ;;
  397.     *) ;;
  398. esac
  399. rm -f ${LIST} ${PIPE} 2>/dev/null
  400. [ -n "$error" ] && echo "\n${error}\n"
  401. trap '' 0 1 2 15
  402. exit "$ec"
  403. }
  404. #-----------------------------------------------------------------#
  405. # Variables.                                                      #
  406. #-----------------------------------------------------------------#
  407. USAGE_EC=1                         # exit code for usage error
  408. NOMNT_EC=2                         # exit code wrong device name
  409. NOTAP_EC=3                         # exit code no tape available
  410. LISTE_EC=4                         # exit code backup list error
  411. NOTAR_EC=5                         # exit code for wrong tar
  412. TRAPP_EC=6                         # exit code for trap
  413. PIPEP_EC=7                         # exit code for pipe
  414. RHOST_EC=8                         # exit code for bad ping
  415. NORSH_EC=9                         # exit code for bad rsh
  416. DEVICE="$1"                        # device to tar into
  417. LIST="/tmp/.tar.$LOGNAME.$$"       #
  418. REMOTEH=""                         # Remote host for backup
  419. REMOTET=""                         # Remote tape for backup
  420. tapedev=                           #
  421. PIPE="/tmp/pipe"                   # Pipe for remote backup
  422. #-----------------------------------------------------------------#
  423. # main()                                                          #
  424. #-----------------------------------------------------------------#
  425. tput clear
  426. echo "\n\t$PROG started from $LOGNAME@$HOST on $TERM at $TODAY.\n"
  427. rm -f $LIST 2>/dev/null
  428. #-----------------------------------------------------------------#
  429. # Trap on exit/interrupt/break to clean up                        #
  430. #-----------------------------------------------------------------#
  431. trap "cleanup $TRAPP_EC \"Abnormal program termination. $PROG"\"  0 1 2 15
  432. #-----------------------------------------------------------------#
  433. # Check command options                                           #
  434. #-----------------------------------------------------------------#
  435. [ "$#" -ne 1 ]  &&  cleanup "$USAGE_EC" ""
  436. #-----------------------------------------------------------------#
  437. # Check device name                                               #
  438. #-----------------------------------------------------------------#
  439. [ `expr "$DEVICE" : "[/]"` -eq 0 ] && cleanup "$NOMNT_EC" \
  440.         "$PROG: Backup device or file name must start with a '/'."
  441. #-----------------------------------------------------------------#
  442. # Check tape device.                                              #
  443. #-----------------------------------------------------------------#
  444. case "$DEVICE"
  445. in
  446.     #
  447.     # Fix the block size if $DEVICE is a tape device
  448.     #
  449.     /dev/rmt[0-9]*)
  450.         #
  451.         echo "\n\t$PROG: Verify backup media ($DEVICE)............\n"
  452.         #
  453.         # see if a low or high density tape device was specified
  454.         # (eg rmt0.1)
  455.         density="`expr $DEVICE : \
  456.                 "/dev/rmt[0-9]*\.\([0-9]*\)"`"
  457.         #
  458.         # strip /dev/ from device name and
  459.         # get the base name (eg translate:
  460.         # /dev/rmt0.2 to rmt0)
  461.         #
  462.         tapedev="`expr $DEVICE : \
  463.                 "/dev/\(rmt[0-9]*\)[\.]*[0-9]*"`"
  464.         #
  465.         # Check if the tape is defined in the system.
  466.         lsdev -C -c tape -S Available -F "name" | grep $tapedev >/dev/null 2>&1
  467.         rc=$?
  468.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  469.         #
  470.         # Restore old tape name.
  471.         #
  472.         [ "${density:-1}" -lt 4 ] && density=1 || density=5
  473.         DEVICE="/dev/${tapedev}.${density}"
  474.         echo "\n\t$PROG: Insert a tape in ($DEVICE)........(press enter)\n"
  475.         read TEMP
  476.         echo "\n\t$PROG: Rewinding tape to begin...........(please wait)\n"
  477.         tctl -f $DEVICE rewind 2>/dev/null
  478.         ;;
  479.     #
  480.     # Backup is done on remote host. The remote shell facility
  481.     # must be set up and running.
  482.     #
  483.     ${PIPE}*)
  484.         #
  485.         echo "\n\t$PROG: Assuming remote backup via network.\n"
  486.         echo "\t$PROG: Enter name of Remote Host   ===> \c"
  487.         read REMOTEH
  488.         echo "\n\t$PROG: Pinging Remote Host to test connection.\n"
  489.         ping ${REMOTEH} 1 1 >/dev/null 2>&1
  490.         rc=$?                                    # give up unknown host
  491.         [ "$rc" -ne 0 ] && cleanup "$RHOST_EC" ""
  492.         JUNK=$(rsh ${REMOTEH} "/usr/sbin/lsdev -C -c tape -S Available")
  493.         rc=$?                                    # give up rsh failed
  494.         [ "$rc" -ne 0 ] && cleanup "$NORSH_EC" ""
  495.         echo "\t$PROG: Available Tapes on ${REMOTEH} are :\n\n\t\t${JUNK}\n"
  496.         echo "\t$PROG: Enter name of Remote Tape (e.g. /dev/rmt0) ===> \c"
  497.         read REMOTET
  498.         echo "\n\t$PROG: Insert tape on ${REMOTEH} in ${REMOTET}..(press enter)"
  499.         read TEMP
  500.         echo "\t$PROG: Rewinding Remote Tape ${REMOTET} on ${REMOTEH}.\n"
  501.         rsh ${REMOTEH} "tctl -f ${REMOTET} rewind"
  502.         rc=$?                                    # give up rsh failed
  503.         [ "$rc" -ne 0 ] && cleanup "$NOTAP_EC" ""
  504.         rm -f ${PIPE} 2>/dev/null
  505.         mknod ${PIPE} p
  506.         rc=$?                                    # give up mknod failed
  507.         [ "$rc" -ne 0 ] && cleanup "$PIPEP_EC" ""
  508.         cat ${DEVICE} | rsh ${REMOTEH} "dd of=${REMOTET} obs=100b 2>/dev/null" &
  509.         ;;
  510.     *)  ;;
  511. esac
  512. #-----------------------------------------------------------------#
  513. # Prepare the list.                                               #
  514. #-----------------------------------------------------------------#
  515. echo "\n\t$PROG: Create list of files to be saved...."
  516. find $HOME -print > $LIST
  517. rc=$?
  518. [ "$rc" -ne 0 ] &&  cleanup "$LISTE_EC" ""
  519. #-----------------------------------------------------------------#
  520. # tar the files.                                                  #
  521. #-----------------------------------------------------------------#
  522. echo "\n\t$PROG: Changing current directory to (/)...."
  523. cd / > /dev/null 2>&1
  524. echo "\n\t$PROG: Running tar format backup from user ($LOGNAME)...."
  525. tar -cvf "$DEVICE" -L "$LIST"
  526. rc="$?"
  527. [ "$rc" -ne 0 ]  && cleanup "$NOTAR_EC" ""
  528. #-----------------------------------------------------------------#
  529. # Backup completed                                                #
  530. #-----------------------------------------------------------------#
  531. TODAY=$(date +%H:%M:%S)
  532. echo "\n\t$PROG ended at $TODAY............................\n\n"
  533. cleanup 0
  534. #-----------------------------------------------------------------#
  535. # EOF                                                             #
  536. #-----------------------------------------------------------------#
  537.  
  538.  
  539. 1.22: How do I backup a multi-disk volume group?
  540. From: pack@acd.ucar.edu (Daniel Packman)
  541.  
  542. [ Editor's note: I have not verified this procedure.  I would actually
  543.   recommend NOT to have one volume group span multiple disks unless you
  544.   really need such big logical volumes. ]
  545.  
  546.   1. If you have a set of three or more disks in a volume group.
  547.      (typically 3 for 5xx machines with three internal drives;
  548.      with only two, the procedures outlined here have to be modified
  549.      to ignore the fact that you don't have a quorum in the volume group)
  550.  
  551.   2. If one drive has failed (usually only one fails at a time :-) )
  552.  
  553. It is possible to go through a service boot and (if we say the volume
  554. group is called rootvg and one of the 2 good disks on it is called hdisk0):
  555.  
  556.   importvg -y rootvg hdisk0
  557.   varyonvg -f -n -m1 rootvg
  558.  
  559. These commands will work, but give error messages.  If you wish to mount
  560. a user filesystem, say /u on logical volume /dev/lv00, then
  561.  
  562.   mount -f /dev/lv00 /v
  563.  
  564. will work only if the jfslog, the journaled file system log device, is not
  565. on the damaged disk.  If it is, you must (and can in any case) mount the
  566. filesystem read-only:
  567.  
  568.   mount -f -r /dev/lv00 /v
  569.  
  570. This crucial and rather obvious point baffled several level 3 support
  571. personnel at Austin as well as myself for almost a week.  Once the file
  572. system(s) of interest are available, then they can be saved to tape for
  573. restoration later.  Of course, one can expect only about two thirds of a
  574. filesystem to be recoverable if it spans all 3 physical disks.  One
  575. other point to remember is that the standard boot procedure from floppy
  576. includes the restore command but does not include the backup command.
  577.  
  578. ******************************************************************************
  579. * If you do not have other RS6000 machines at your site is is imperative     *
  580. * that you either build a bootable tape which includes either restore or     *
  581. * tar or cpio (a bootable floppy set will not have enough space) or at the   *
  582. * very least copy onto a spare floppy backup, cpio, or tar.  The floppy      *
  583. * should be created with backup -ivq so that its contents can be read into   *
  584. * the memory resident system after booting.                                  *
  585. ******************************************************************************
  586.  
  587. All is not lost if tar, cpio or backup are available on an undamaged
  588. disk that can be mounted.  Since tar and cpio are in /bin, they may both
  589. very well be unavailable.
  590.  
  591. It is a very good idea for those who have tape devices to build a
  592. bootable tape with their desired extra commands in it.  Follow the
  593. instructions from IBM but add your desired commands to the following
  594. three files:
  595.  
  596.     /usr/lpp/bosinst/tape2
  597.     /usr/lpp/bosinst/diskette/boot2
  598.     /usr/lpp/bosinst/diskette/inslist
  599.  
  600. If you have anything other than a minimum memory configuration, you
  601. should be able to add many commands.
  602.  
  603.  
  604. 1.23: How do I put multiple backups on a single 8mm tape?
  605. From: kerm@mcnc.org (Cary E. Burnette)
  606.  
  607. There are two possible solutions to this, which both use the /dev/rmt0.1
  608. device which is non-rewinding.
  609.  
  610. SOLUTION #1
  611. -----------
  612.  
  613. To put multiple backups on a single tape, use /dev/rmt0.1, which is a
  614. no-rewind device, using either rdump or backup (both by name & inode
  615. work).  Using rdump or backup "byinode" both generate the message that
  616. the tape is rewinding but actually do not.  This is an example that
  617. would work on my system:
  618.  
  619. # rsh remote1 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  620. # rsh remote2 -l root /etc/rdump host:/dev/rmt0.1 -Level -u /u
  621. # tctl -f /dev/rmt0.1 rewind       # rewinds the tape
  622.  
  623. where I am implementing the command from host.
  624. To restore a table of contents of the first I would use
  625.  
  626. # restore -f /dev/rmt0.1 -s1 -tv
  627.  
  628. where the -s1 flag tells restore to go to the first record it comes
  629. across on the tape.  To get the second type in exactly the same once
  630. again.  Basically -s(Number) stands for - go to Number record from this
  631. spot.  It works pretty well.
  632.  
  633.  
  634. SOLUTION #2
  635. -----------
  636.  
  637. Steve Knodle
  638. Educational Resources Center
  639. Clarkson University
  640.  
  641. I use:
  642. ------------------- Dump.sh --------------------
  643. CONTENTSFILE=`date |dd conv=lcase |sed -e 's/19//' |awk '{print $6 $2 $3}'`
  644. set -x
  645. LEVEL=$1
  646. shift
  647.  
  648. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /
  649. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /usr
  650. backup -c -b 56 -$LEVEL -uf /dev/rmt0.1 /u
  651. tctl -f /dev/rmt0 rewind
  652.  
  653. touch /usr/local/dumps/Contents.$CONTENTSFILE
  654. echo "Dumping /" >>/usr/local/dumps/Contents.$CONTENTSFILE
  655. restore -t -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  656. echo "Dumping /usr" >>/usr/local/dumps/Contents.$CONTENTSFILE
  657. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  658. echo "Dumping /u" >>/usr/local/dumps/Contents.$CONTENTSFILE
  659. restore -t -q -s 1 -f /dev/rmt0.1 >>/usr/local/dumps/Contents.$CONTENTSFILE
  660. tctl -f /dev/rmt0 rewind
  661.  
  662. I process the table-of-contents first by a little program that does
  663. common prefix encoding, and then compress.
  664.  
  665. This gives a table of contents file I can keep on-line until the tape
  666. is reused.
  667.  
  668.  
  669. 1.24 *How do I remove a committed lpp?
  670. From: drb@chmeds.ac.nz (Ross Boswell)
  671.  
  672. This seems to be a common problem.  I got the following script from IBM
  673. NZ AIX software support.  As far as I know, it works -- I used it to
  674. remove unwanted fonts.  I have no official permission to post it -- use
  675. it at your own risk!
  676.